Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle skipped audits and groups #911

Merged
merged 5 commits into from
Jan 10, 2025

Conversation

hanna-skryl
Copy link
Collaborator

Fixes #903

This fix enhances the filtering of report results by audits and groups through the core configuration (currently implemented for the Lighthouse plugin only).

The isSkipped property is introduced in the PluginConfig metadata for audits and groups, ensuring the complete set of plugin audits and groups is retained during CoreConfig validation to prevent unexpected errors. Filtering is now deferred to the filter middleware, which accurately handles skipped items by removing categories that contain only skipped or zero-weight references.

@hanna-skryl hanna-skryl self-assigned this Jan 7, 2025
@hanna-skryl hanna-skryl changed the title fix: handle skipped audits and groups fix: handle skipped audits and groups Jan 7, 2025
@hanna-skryl hanna-skryl force-pushed the fix/invalid-category-references branch from 8610bf6 to 884f53c Compare January 7, 2025 00:54
Copy link

github-actions bot commented Jan 7, 2025

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared target commit 4df66ef with source commit 4777a83.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🟡 57 🔴 50 ↓ −6.7
Code coverage 🟢 91 🟢 91 ↑ +0.1
Security 🟡 81 🟡 81
Updates 🟡 80 🟡 80
Accessibility 🟢 91 🟢 91
Best Practices 🟢 100 🟢 100
SEO 🟡 61 🟡 61
Bug prevention 🟢 100 🟢 100
Code style 🟢 100 🟢 100
👍 1 group improved, 👎 1 group regressed, 👍 4 audits improved, 👎 4 audits regressed, 10 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🟡 57 🔴 50 ↓ −6.7
Code coverage Code coverage metrics 🟢 91 🟢 91 ↑ +0.1

15 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Speed Index 🟨 5.0 s 🟥 6.6 s ↑ +30.7 %
Lighthouse Largest Contentful Paint 🟨 3.1 s 🟨 3.5 s ↑ +15 %
Lighthouse Time to Interactive 🟥 12.4 s 🟥 15.9 s ↑ +28.2 %
Lighthouse Total Blocking Time 🟥 2,540 ms 🟥 7,510 ms ↑ +196.2 %
Lighthouse First Contentful Paint 🟨 2.9 s 🟨 2.9 s ↓ −2.2 %
Code coverage Branch coverage 🟨 85.6 % 🟨 85.8 % ↑ +0.2 %
Code coverage Line coverage 🟩 90.4 % 🟩 90.5 % ↑ +0.1 %
Code coverage Function coverage 🟩 93.1 % 🟩 93.2 % ↑ +0.1 %
Lighthouse Minimizes main-thread work 🟥 12.0 s 🟥 19.4 s ↑ +61.4 %
Lighthouse JavaScript execution time 🟥 4.5 s 🟥 8.9 s ↑ +97.9 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 1,825 KiB 🟩 Total size was 1,828 KiB ↑ +0.2 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +28.2 %
Lighthouse Max Potential First Input Delay 🟥 1,480 ms 🟥 3,070 ms ↑ +107.5 %
Lighthouse Eliminate render-blocking resources 🟥 Potential savings of 1,150 ms 🟥 Potential savings of 830 ms ↓ −27.4 %
Lighthouse Server Backend Latencies 🟩 160 ms 🟩 300 ms ↑ +87.7 %
Lighthouse Uses efficient cache policy on static assets 🟨 28 resources found 🟨 28 resources found ↑ +0.1 %
Lighthouse Initial server response time was short 🟩 Root document took 500 ms 🟩 Root document took 590 ms ↑ +18.2 %
Lighthouse Network Round Trip Times 🟩 70 ms 🟩 70 ms ↓ −0.6 %

570 other audits are unchanged.

@hanna-skryl hanna-skryl marked this pull request as ready for review January 7, 2025 19:47
@hanna-skryl hanna-skryl requested a review from BioPhoton as a code owner January 7, 2025 19:47
@hanna-skryl hanna-skryl force-pushed the fix/invalid-category-references branch from 1e29603 to 10e761b Compare January 8, 2025 03:29
@github-actions github-actions bot added the 📖 Project documentation improvements or additions to the project documentation label Jan 10, 2025
@hanna-skryl hanna-skryl merged commit 6a74c2d into main Jan 10, 2025
16 checks passed
@hanna-skryl hanna-skryl deleted the fix/invalid-category-references branch January 10, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧩 cli 🧩 lighthouse-plugin 🧩 models 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix onlyAudits and onlyGroups errors in Lighthouse plugin
2 participants